package com.tgb.entity;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name="t_user_info")
public class UserInfo {
	
	private Integer id;
	private String info;
	private User user;
	
	@Id
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getInfo() {
		return info;
	}
	public void setInfo(String info) {
		this.info = info;
	}
	
	
	@OneToOne(fetch = FetchType.LAZY,mappedBy = "userInfo")
	//@JoinColumn(name="user_id")
	public User getUser() {
    return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
}
	

	

